<?php
namespace App\Listener;

use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Event\Annotation\Listener;

/**
 * @Listener 
 */
class ShopCheckTimeListener implements ListenerInterface
{
    public function listen(): array
    {
        return [
            \App\Event\Shop\StatusEvent::class,
            \App\Event\Shop\CheckTimeEvent::class,
        ];
    }
    
    // 重置考核时间
    public function process($event)
    {
        $event->shop->setCheckTime($event->config('shop_check_time') * 60 * 60 * 24);
    }
}